segyz
segyz(cmd0::String="", arg1=nothing; kwargs...)Plot a SEGY file in 3-D as a seismic data image.
(Warning: Manual translate by Claude. Needs revision)
Description
Reads a native (IEEE) format SEGY file and produces a plot of the seismic data. The imagemask operator is used so that the seismic data are plotted as a 1-bit deep bitmap in a single (user-specified) color or gray shade, with a transparent background. The bitmap resolution is taken from the current GMT defaults. The seismic traces may be plotted at their true locations using information in the trace headers (in which case order of the traces in the file is not significant). Standard GMT geometry routines are used so that in principle any map projection may be used, however it is likely that the geographic projections will lead to unexpected results. Beware that a couple of the options for the 2-D plotter are not available in here.
Note that the order of operations before the seismic data are plotted is deviation*clip. Deviation determines how far in the plot coordinates a [normalized][biased][clipped] sample value of 1 plots from the trace location.
The SEGY file should be a disk image of the tape format (i.e., 3200 byte text header, which is ignored, 400 byte binary reel header, and 240 byte header for each trace) with samples as native real*4 (IEEE real on all the platforms to which I have access).
Required Arguments
SEGYfile Seismic SEGY data set to be imaged (passed as first argument or via cmd0).
J or proj or projection : – proj=
Select map projection. More at projJz or zscale : – zscale=val
Set the z-axis scaling.R or region or limits : – limits=(xmin, xmax, ymin, ymax, zmin, zmax) | limits=(BB=(xmin, xmax, ymin, ymax, zmin, zmax),) | …more
Specify the region of interest. Default limits are computed from data extents. More at limitsD or dev or deviation : – deviation=val | deviation=“devX/devY”
Gives the deviation in X units of the plot for 1.0 on the scaled trace. This may be a single number (applied equally in X and Y directions) or the pair devX/devY.F or fill or color : – fill=color | fill=true
Fill trace (variable area, defaults to filling positive). Specify the color with which the imagemask is filled.W or wiggle : – wiggle=true
Draw wiggle trace.
You must specify at least one of wiggle and fill.
Optional Arguments
A or byteswap or swap : – swap=true
Flip the default byte-swap state (default assumes data have a bigendian byte-order).C or clip : – clip=val
Sample value at which to clip data (clipping is applied to both positive and negative values).I or negative or fillneg : – negative=true
Fill negative rather than positive excursions.L or nsamp or nsamples : – nsamples=val
Override number of samples per trace in reel header (program attempts to determine number of samples from each trace header if possible to allow for variable length traces).M or ntraces : – ntraces=val
Override number of traces specified in reel header. Program detects end of file (relatively) gracefully, but this parameter limits number of traces that the program attempts to read.N or normalize or norm : – normalize=true
Normalize trace by dividing by rms amplitude over full trace length.Q or adjust : – adjust=(bias=val, dpi=val, redvel=val, xmult=val, dy=val)
Can be used to change 5 different settings:
bias (or b): bias scaled traces (e.g.,bias=-0.1subtracts 0.1 from values).
dpi (or i): sets the dots-per-inch resolution of the image [300].
redvel (or u): apply reduction velocity (negative removes reduction already present).
xmult (or x): multiply trace locations by mult.
dy (or y): override sample interval in reel header.S or header or traceheader : – header=(:c, :o) | header=(x=:c, y=:o)
Read trace locations from trace headers: headers is either :c (or :cdp) for CDP, :o (or :offset) for offset, a NamedTuple with byte=num to read a long starting at byte num in the header (first byte corresponds to num=0), or a number to fix the location. First parameter for x, second for y. Use a Tuple like(:c, :o)or a NamedTuple like(x=:c, y=:o). Default has X and Y given by trace number.Z or skipzero or nozero : – skipzero=true
Do not plot traces with zero rms amplitude.U or time_stamp : – time_stamp=true | time_stamp=(just=“code”, pos=(dx,dy), label=“label”, com=true)
Draw GMT time stamp logo on plot. More at timestampV or verbose : – verbose=true | verbose=level
Select verbosity level. More at verboseX or xshift or x_offset : xshift=true | xshift=x-shift | xshift=(shift=x-shift, mov=“a|c|f|r”)
Shift plot origin. More at xshiftY or yshift or y_offset : yshift=true | yshift=y-shift | yshift=(shift=y-shift, mov=“a|c|f|r”)
Shift plot origin. More at yshiftp or view or perspective : – view=(azim, elev)
Default is viewpoint from an azimuth of 200 and elevation of 30 degrees.
Specify the viewpoint in terms of azimuth and elevation. The azimuth is the horizontal rotation about the z-axis as measured in degrees from the positive y-axis. That is, from North. This option is not yet fully expanded. Current alternatives are:- view=??
A full GMT compact string with the full set of options. - view=(azim,elev)
A two elements tuple with azimuth and elevation - view=true
To propagate the viewpoint used in a previous module (makes sense only inbar3!) More at perspective
- view=??
t or transparency or alpha: – alpha=50
Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. Works only for the PDF and PNG formats.figname or savefig or name : – figname=
name.png
Save the figure with thefigname=name.extwhereextchooses the figure image format.
Examples
To plot the SEGY file wa1.segy with normalized traces plotted at true offset locations, clipped at ±3 and with wiggle trace and positive variable area shading in black, use
using GMT
segyz("wa1.segy", proj="X5i/-5i", zscale="0.05i", view=(180,5),
region=(0,100,0,10,0,10), deviation=1, clip=3, normalize=true,
header=(:o, :o), wiggle=true, fill=:black, figname="segy.pdf")Bugs
Variable area involves filling four-sided figures of distressing generality. I know that some of the more complex degenerate cases are not dealt with correctly or at all; the incidence of such cases increases as viewing angles become more oblique, and particularly as the viewing elevation increases. Wiggle-trace plotting is not affected.
Source Code
This function has multiple methods:
segyz(cmd0::String; kwargs...)- segy.jl:49segyz(; ...)- segy.jl:49segyz(arg1; kwargs...)- segy.jl:50